import request from '@/utils/request'

// 查询项目收款列表
export function listDealCollection(query) {
  return request({
    url: '/collection/dealCollection/list',
    method: 'get',
    params: query
  })
}

// 查询项目收款列表
export function getReportList(query) {
  return request({
    url: '/collection/dealCollection/collectionReport',
    method: 'get',
    params: query
  })
}

// 查询项目收款详细
export function getDealCollection(id) {
  return request({
    url: '/collection/dealCollection/' + id,
    method: 'get'
  })
}

// 保存项目收款
export function saveDealCollection(data) {
  return request({
    url: '/collection/dealCollection/save',
    method: 'post',
    data: data
  })
}

// 删除项目收款
export function delDealCollection(id) {
  return request({
    url: '/collection/dealCollection/' + id,
    method: 'delete'
  })
}

// 导出项目收款
export function exportDealCollection(query) {
  return request({
    url: '/collection/dealCollection/export',
    method: 'get',
    params: query
  })
}

// 根据部门ID查询项目回款
export function findSummaryInfo(params) {
  return request({
    url: '/collection/dealCollection/findSummaryInfo',
    method: 'get',
    params: params
  })
}

export function findWarningCollection(params) {
  return request({
    url: '/collection/dealCollection/warningCollection',
    method: 'get',
    params: params
  })
}

// 根据团队成员用户ID查询项目回款
export function findSummaryInfoByTeamUserIds(params) {
  return request({
    url: '/collection/dealCollection/findSummaryInfoByTeamUserIds',
    method: 'post',
    data: params
  })
}

// 批量修改收款时间
export function batchEditCollectionTime(param) {
  return request({
    url: '/collection/dealCollection/batchEditCollectionTime',
    method: 'post',
    data: param
  })
}
